<template>
	<view>
		<view class="head">
			<view class="headContent">
				<text style="color: white; font-size: 60rpx; margin-top: 100rpx;">
					智能统计
				</text>
				<text style="color: white; font-size: 24rpx; margin-top: 16rpx;">
					INTELLIGENT STATISTICS
				</text>
			</view>
		</view>
		<view class="footer">
			<view class="footerConten" @click="goTianBao">
				<image src="../../static/statistics/tianbao.png" style="width: 150rpx; height: 150rpx; margin-left: 30rpx;" mode="aspectFit"></image>
				<view style="display: flex; flex-direction: column;">
					<text style="font-size: 34rpx; font-weight: 600; margin-bottom: 10rpx;">养殖信息填报</text>
					<text style="font-size: 26rpx; color: #C3C3C3;">丰富养殖场的备案信息</text>
				</view>
				<image src="../../static/statistics/button.png" style="width: 60rpx; height: 60rpx; margin-right: 30rpx;" mode="aspectFit"></image>
			</view>
			<view class="footerConten" @click="goTongJi">
				<image src="../../static/statistics/tongji.png" style="width: 150rpx; height: 150rpx; margin-left: 30rpx;" mode="aspectFit"></image>
				<view style="display: flex; flex-direction: column;">
					<text style="font-size: 34rpx; font-weight: 600; margin-bottom: 10rpx;">智能统计</text>
					<text style="font-size: 26rpx; color: #C3C3C3;">快速了解，正确决策</text>
				</view>
				<image src="../../static/statistics/button.png" style="width: 60rpx; height: 60rpx; margin-right: 30rpx;" mode="aspectFit"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data () {
			return {
				
			}
		},
		methods: {
			goTianBao () {
				console.log(this.User.userRight)
				let Right = this.User.userRight.name;
				if(Right=="government"){
					console.log(22)
					uni.navigateTo({
						url: '../statistics/farmer_information'
					})
				}
				else{
					console.log(11)
					uni.showToast({
						title:"您没有访问权限！",
						icon:"none"
					})
				}
			},
			
			goTongJi () {
				console.log(this.User.userRight)
				let Right = this.User.userRight.name;
				if(Right!="government"){
					console.log(11)
					uni.showToast({
						title:"您没有访问权限！",
						icon:"none"
					})
				}
				else if(Right=="government"){
						console.log(22)
					uni.navigateTo({
					url: '../statistics/city'
				})
				}
				
			}
		}
	}
</script>

<style lang="less">
	.head {
		height: 550rpx;
		width: 750rpx;
		background-image: url(../../static/statistics/bg1.png);
		background-repeat:no-repeat; 
		background-size:100% 100%;
		-moz-background-size:100% 100%;
	}
	
	.headContent {
		display: flex;
		flex-direction: column;
		margin-left: 44rpx;
	}
	
	.footer {
		width: 660rpx;
		height: auto;
		display: flex;
		flex-direction: column;
		align-items: center;
		background: white;
		margin-top: -200rpx;
		margin-left: 45rpx;
	}
	
	.footerConten {
		height: 240rpx;
		width: 660rpx;
		margin-bottom: 20rpx;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		align-items: center;
		box-shadow: 2rpx 4rpx 24rpx 4rpx #d9f4e9;
		border-radius: 10rpx;
	}
</style>
